\(\int \frac {c+d x^2}{x (a+b x^2)^2} \, dx\) [267]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 51 \[ \int \frac {c+d x^2}{x \left (a+b x^2\right )^2} \, dx=\frac {b c-a d}{2 a b \left (a+b x^2\right )}+\frac {c \log (x)}{a^2}-\frac {c \log \left (a+b x^2\right )}{2 a^2} \]

[Out]

1/2*(-a*d+b*c)/a/b/(b*x^2+a)+c*ln(x)/a^2-1/2*c*ln(b*x^2+a)/a^2

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {457, 78} \[ \int \frac {c+d x^2}{x \left (a+b x^2\right )^2} \, dx=-\frac {c \log \left (a+b x^2\right )}{2 a^2}+\frac {c \log (x)}{a^2}+\frac {b c-a d}{2 a b \left (a+b x^2\right )} \]

[In]

Int[(c + d*x^2)/(x*(a + b*x^2)^2),x]

[Out]

(b*c - a*d)/(2*a*b*(a + b*x^2)) + (c*Log[x])/a^2 - (c*Log[a + b*x^2])/(2*a^2)

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int \frac {c+d x}{x (a+b x)^2} \, dx,x,x^2\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \left (\frac {c}{a^2 x}+\frac {-b c+a d}{a (a+b x)^2}-\frac {b c}{a^2 (a+b x)}\right ) \, dx,x,x^2\right ) \\ & = \frac {b c-a d}{2 a b \left (a+b x^2\right )}+\frac {c \log (x)}{a^2}-\frac {c \log \left (a+b x^2\right )}{2 a^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.90 \[ \int \frac {c+d x^2}{x \left (a+b x^2\right )^2} \, dx=\frac {\frac {a (b c-a d)}{b \left (a+b x^2\right )}+2 c \log (x)-c \log \left (a+b x^2\right )}{2 a^2} \]

[In]

Integrate[(c + d*x^2)/(x*(a + b*x^2)^2),x]

[Out]

((a*(b*c - a*d))/(b*(a + b*x^2)) + 2*c*Log[x] - c*Log[a + b*x^2])/(2*a^2)

Maple [A] (verified)

Time = 2.66 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.94

method result size
norman \(\frac {\left (a d -b c \right ) x^{2}}{2 a^{2} \left (b \,x^{2}+a \right )}+\frac {c \ln \left (x \right )}{a^{2}}-\frac {c \ln \left (b \,x^{2}+a \right )}{2 a^{2}}\) \(48\)
default \(\frac {c \ln \left (x \right )}{a^{2}}+\frac {-c \ln \left (b \,x^{2}+a \right )-\frac {\left (a d -b c \right ) a}{b \left (b \,x^{2}+a \right )}}{2 a^{2}}\) \(49\)
risch \(-\frac {d}{2 b \left (b \,x^{2}+a \right )}+\frac {c}{2 a \left (b \,x^{2}+a \right )}+\frac {c \ln \left (x \right )}{a^{2}}-\frac {c \ln \left (b \,x^{2}+a \right )}{2 a^{2}}\) \(53\)
parallelrisch \(\frac {2 b c \ln \left (x \right ) x^{2}-b c \ln \left (b \,x^{2}+a \right ) x^{2}+a d \,x^{2}-c b \,x^{2}+2 \ln \left (x \right ) a c -a c \ln \left (b \,x^{2}+a \right )}{2 a^{2} \left (b \,x^{2}+a \right )}\) \(71\)

[In]

int((d*x^2+c)/x/(b*x^2+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/2*(a*d-b*c)/a^2*x^2/(b*x^2+a)+c*ln(x)/a^2-1/2*c*ln(b*x^2+a)/a^2

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.39 \[ \int \frac {c+d x^2}{x \left (a+b x^2\right )^2} \, dx=\frac {a b c - a^{2} d - {\left (b^{2} c x^{2} + a b c\right )} \log \left (b x^{2} + a\right ) + 2 \, {\left (b^{2} c x^{2} + a b c\right )} \log \left (x\right )}{2 \, {\left (a^{2} b^{2} x^{2} + a^{3} b\right )}} \]

[In]

integrate((d*x^2+c)/x/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

1/2*(a*b*c - a^2*d - (b^2*c*x^2 + a*b*c)*log(b*x^2 + a) + 2*(b^2*c*x^2 + a*b*c)*log(x))/(a^2*b^2*x^2 + a^3*b)

Sympy [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.90 \[ \int \frac {c+d x^2}{x \left (a+b x^2\right )^2} \, dx=\frac {- a d + b c}{2 a^{2} b + 2 a b^{2} x^{2}} + \frac {c \log {\left (x \right )}}{a^{2}} - \frac {c \log {\left (\frac {a}{b} + x^{2} \right )}}{2 a^{2}} \]

[In]

integrate((d*x**2+c)/x/(b*x**2+a)**2,x)

[Out]

(-a*d + b*c)/(2*a**2*b + 2*a*b**2*x**2) + c*log(x)/a**2 - c*log(a/b + x**2)/(2*a**2)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.00 \[ \int \frac {c+d x^2}{x \left (a+b x^2\right )^2} \, dx=\frac {b c - a d}{2 \, {\left (a b^{2} x^{2} + a^{2} b\right )}} - \frac {c \log \left (b x^{2} + a\right )}{2 \, a^{2}} + \frac {c \log \left (x^{2}\right )}{2 \, a^{2}} \]

[In]

integrate((d*x^2+c)/x/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

1/2*(b*c - a*d)/(a*b^2*x^2 + a^2*b) - 1/2*c*log(b*x^2 + a)/a^2 + 1/2*c*log(x^2)/a^2

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.24 \[ \int \frac {c+d x^2}{x \left (a+b x^2\right )^2} \, dx=\frac {c \log \left (x^{2}\right )}{2 \, a^{2}} - \frac {c \log \left ({\left | b x^{2} + a \right |}\right )}{2 \, a^{2}} + \frac {b^{2} c x^{2} + 2 \, a b c - a^{2} d}{2 \, {\left (b x^{2} + a\right )} a^{2} b} \]

[In]

integrate((d*x^2+c)/x/(b*x^2+a)^2,x, algorithm="giac")

[Out]

1/2*c*log(x^2)/a^2 - 1/2*c*log(abs(b*x^2 + a))/a^2 + 1/2*(b^2*c*x^2 + 2*a*b*c - a^2*d)/((b*x^2 + a)*a^2*b)

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.92 \[ \int \frac {c+d x^2}{x \left (a+b x^2\right )^2} \, dx=\frac {c\,\ln \left (x\right )}{a^2}-\frac {c\,\ln \left (b\,x^2+a\right )}{2\,a^2}-\frac {a\,d-b\,c}{2\,a\,b\,\left (b\,x^2+a\right )} \]

[In]

int((c + d*x^2)/(x*(a + b*x^2)^2),x)

[Out]

(c*log(x))/a^2 - (c*log(a + b*x^2))/(2*a^2) - (a*d - b*c)/(2*a*b*(a + b*x^2))